package com.nunbey.lingxi.mode.userinfo;

import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDate;
import java.time.LocalDateTime;


/**
 * @description 用户信息类
 * @author lincat
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("user_info")
public class UserInfoEntity {

    private int userId;

    private String nickname;

    private String headImage;

    private int sex;

    private LocalDate birth;

    private LocalDateTime updateTime;

    /**
     * @description 用户信息初始化的构造方法
     * @param userId
     */
    public UserInfoEntity(int userId){
        this.userId = userId;
        this.headImage = "";
        this.sex = 0;
        this.birth = LocalDate.now();
        this.updateTime = LocalDateTime.now();
        this.nickname = "灵犀用户";
    }
}
